<template>
  <div>
    <div class="myheader">
      <div class="myheader-left">
        <div>
          <img src="../../public/img/logo/logo.png" alt="" />
        </div>
        <div class="input">
          按作者或者出版社搜索图书
          <img class="img1" src="../../public/img/logo/ssk.png" alt="" />
        </div>
      </div>
      <div class="myheader-reight">
        <span>跟踪订单</span>
        <div>
          <img class="img2" src="../../public/img/logo/cart.png" alt="" />
        </div>
        <button @click="gologin">登录</button>
      </div>
      <!-- <router-link to="register">登入</router-link> -->
    </div>
  </div>
</template>

<script>
export default {
  // data() {
  //   return {
  //     key: value
  //   }
  // },
  methods:{
    gologin(){
      const target='/login'
      if(this.$route.path!==target){
        this.$router.push(target)
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.myheader {
  // background-color: aqua;
  width: 1300px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .myheader-left {
    // background-color: azure;
    width: 650px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .input {
      width: 400px;
      height: 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      // background-color: beige;
      border: 1px solid rgb(160, 156, 156);
      border-radius: 40px;
      padding: 0 15px;
      font-size: 16px;
      .img1 {
        height: 20px;
        width: 20px;
      }
    }
  }
  .myheader-reight {
    display: flex;
    width: 400px;
    height: 40px;
    justify-content: space-between;
    align-items: center;
    // background-color: blue;
    font-size: 14px;
    .img2 {
      width: 25px;
      height: 25px;
    }
    button {
      height: 40px;
      width: 80px;
      color: white;
      background-color: rgb(254, 47, 36);
      border: none;
      border-radius: 50px;
    }
  }
}
</style>
